package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbCaractTrib generated by hbm2java
 */
@Entity
@Table(name = "TB_CARACT_TRIB", schema = "CATALOGOS")
public class TbCaractTrib implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String ccaractTrib;
	private String cusuario;
	private String dcaractTrib;
	private Date fhingreso;
	private Integer bstatus;
	private Long ncorrelativo;
	private Set<RcCaractTrib> rcCaractTribs = new HashSet<RcCaractTrib>(0);

	public TbCaractTrib() {
	}

	public TbCaractTrib(String ccaractTrib, String cusuario,
			String dcaractTrib, Date fhingreso, Integer bstatus) {
		this.ccaractTrib = ccaractTrib;
		this.cusuario = cusuario;
		this.dcaractTrib = dcaractTrib;
		this.fhingreso = fhingreso;
		this.bstatus = bstatus;
	}

	public TbCaractTrib(String ccaractTrib, String cusuario,
			String dcaractTrib, Date fhingreso, Integer bstatus,
			Long ncorrelativo, Set<RcCaractTrib> rcCaractTribs) {
		this.ccaractTrib = ccaractTrib;
		this.cusuario = cusuario;
		this.dcaractTrib = dcaractTrib;
		this.fhingreso = fhingreso;
		this.bstatus = bstatus;
		this.ncorrelativo = ncorrelativo;
		this.rcCaractTribs = rcCaractTribs;
	}

	@Id
	@Column(name = "C_CARACT_TRIB", unique = true, nullable = false, length = 3)
	public String getCcaractTrib() {
		return this.ccaractTrib;
	}

	public void setCcaractTrib(String ccaractTrib) {
		this.ccaractTrib = ccaractTrib;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Column(name = "D_CARACT_TRIB", nullable = false, length = 40)
	public String getDcaractTrib() {
		return this.dcaractTrib;
	}

	public void setDcaractTrib(String dcaractTrib) {
		this.dcaractTrib = dcaractTrib;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}

	@Column(name = "N_CORRELATIVO", precision = 10, scale = 0)
	public Long getNcorrelativo() {
		return this.ncorrelativo;
	}

	public void setNcorrelativo(Long ncorrelativo) {
		this.ncorrelativo = ncorrelativo;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbCaractTrib")
	public Set<RcCaractTrib> getRcCaractTribs() {
		return this.rcCaractTribs;
	}

	public void setRcCaractTribs(Set<RcCaractTrib> rcCaractTribs) {
		this.rcCaractTribs = rcCaractTribs;
	}

}
